#!/usr/bin/env sh
set -e

LOG_PATH=examples/classify/log
if [ ! -d "$LOG_PATH" ]; then
	mkdir -p $LOG_PATH
fi

MODEL_PATH=models/Scenes
if [ ! -d "$MODEL_PATH" ]; then
	mkdir -p $MODEL_PATH
fi

LOG=$LOG/scenes_caffenet-`date +%Y-%m-%d-%H-%M-%S`.log

./build/tools/caffe train \
    --solver=$MODEL_PATH/solver.prototxt \
    --weights=models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \
    2>&1 | tee $LOG$@
